﻿<Window x:Class="FlagTunes.View.LibraryUpdateWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:FlagTunes.View"
        Title="Updating Library..." WindowStartupLocation="CenterOwner" ResizeMode="NoResize" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="120" Width="450" Icon="/FlagTunes;component/Icons/PlayIcon.png">
    <Window.DataContext>
        <local:MainWindowViewModel />
    </Window.DataContext>
    <StackPanel Orientation="Vertical" Margin="5, 5, 5, 5">
        <StackPanel Orientation="Horizontal">
            <Border BorderBrush="{x:Null}" Height="25">
                <TextBlock TextWrapping="Wrap" Text="Songs count: " VerticalAlignment="Center"/>
            </Border>
            <Border BorderBrush="{x:Null}" Height="25">
                <TextBlock TextWrapping="Wrap" Text="{Binding Path=LibrarySongCount, UpdateSourceTrigger=PropertyChanged, IsAsync=True}" VerticalAlignment="Center"/>
            </Border>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <Border BorderBrush="{x:Null}" Height="25">
                <TextBlock TextWrapping="Wrap" Text="Current song: " VerticalAlignment="Center"/>
            </Border>
            <Border BorderBrush="{x:Null}" Height="25">
                <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Text="{Binding Path=LastUpdatedSong.Path, UpdateSourceTrigger=PropertyChanged}" />
            </Border>
        </StackPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="Ok" Width="75" IsEnabled="{Binding Path=LibraryUpdateFinished, UpdateSourceTrigger=PropertyChanged, IsAsync=True, NotifyOnSourceUpdated=True}" Click="okButton_Click" />
            <Button Content="Cancel" Width="75" Margin="5, 0, 0, 0" />
        </StackPanel>
    </StackPanel>
</Window>